<?php

/**
 * 设置时区，默认时区为东八区(中国)时区(Asia/ShangHai)。
 */
$config['application']['defaultTimeZone'] = 'Asia/ShangHai';

/**
 * 设置URL网址的格式。
 *  Configure::GET_FORMAT为：index.php?router=controller/action&params=value;
 *  Configure::PATH_FORMAT为:index.php/controller/action/params/value。
 * 默认为：Configure::PATH_FORMAT
 */
//$config['application']['urlFormat'] = Configure::GET_FORMAT;

/**
 * 设置是否开启URL路由网址重写(Rewrite)功能。true:开启；false:关闭。默认：关闭。
 */
//$config['application']['rewrite'] = true;

/**
 * 设置是否开启Debug调用功能。true:开启；false:关闭。默认：关闭。
 */
$config['application']['debug'] = getenv('DEBUG');

/**
 * 设置是否开启日志记录功能。true:开启；false:关闭。默认：关闭。
 */
$config['application']['log'] = getenv('LOG');

/**
 * 自定义项目(application)目录路径的设置。注：结尾无需"/"，建议用绝对路径。
 */
//$config['application']['basePath'] = APP_ROOT . '/application';

/**
 * 自定义缓存(cache)目录路径的设置。注：结尾无需"/"，建议用绝对路径。
 */
//$config['application']['cachePath'] = APP_ROOT . '/cache';

/**
 * 自定义日志(log)目录路径的设置。注：结尾无需"/"，建议用绝对路径。
 */
$config['application']['logPath'] = APP_ROOT . '/logs';

/**
 * 设置视图文件的格式。Configure::VIEW_EXT_HTML为html;Configure::VIEW_EXT_PHP为php。默认为：php。
 */
//$config['application']['viewExt'] = Configure::VIEW_EXT_HTML;
$config['db'] = array(
    'dsn' => 'mysql:host='.getenv('DB_HOST').';dbname='.getenv('DB_DATABASE'),
    'username' => getenv('DB_USERNAME'),
    'password' => getenv('DB_PASSWORD'),
    'prefix' => getenv('DB_PREFIX'),
    'charset' => getenv('DB_CHARSET'),
);

$config['weixin'] = array(
	'token' => '',
	'encodingaeskey' => '',
	'appid' => 'wxc2faca3d47006e39',
	'appsecret' => 'cb9680e666f618154b746cca666ed173',
	// 配置商户支付参数
	'mch_id' => '1574029111',
	'mch_key' => 'KB9p8Rx0fEpBKF8rAXJU4CB8kTTd8jJT',
	// 配置商户支付双向证书目录
	'ssl_key' => APP_ROOT.'/application/config/cert/apiclient_key.pem',
	'ssl_cer' => APP_ROOT.'/application/config/cert/apiclient_cert.pem',
	// 配置缓存目录，需要拥有写权限
	'cache_path' => APP_ROOT . '/cache/wechat/',
);

$config['juhe']['expressSearch'] = 'http://v.juhe.cn/exp/index';
$config['juhe']['expressCom'] = 'http://v.juhe.cn/exp/com';
$config['juhe']['key'] = 'cdd339f76ebeb0a9d4b9c801b6e9ef70';

//$config['memcached'] = array(
//	'servers' => array(
//		array('host' => '127.0.0.1', 'port' => 11211),
//	),
//);
$config['baidu']['ak'] = 'dslzjyeXY4O6z2b6DKnwBvWq';

$config['image']['path'] = '/upload/images/';

$config['sms']['accessKeyId'] = 'LTAITtBZw5k4esKb';
$config['sms']['accessKeySecret'] = 'ThkJOwj0HutZxHsx5VfkpnxrsKb2R0';
$config['sms']['templateRegSms'] = 'SMS_127153013';
$config['sms']['templateCodeSms'] = 'SMS_127163087';
$config['sms']['signName'] = '万小程';

$config['oss']['key'] = getenv('OSS_KEY');
$config['oss']['secret'] = getenv('OSS_SERCRET');
$config['oss']['point'] = getenv('OSS_POINT');//oss访问域名
$config['oss']['goto'] = getenv('OSS_GOTO');
$config['oss']['host'] = getenv('OSS_HOST');//用户域名
$config['oss']['bucket'] = getenv('OSS_BUCKET');
$config['oss']['imageDir'] = getenv('OSS_IMAGEDIR');
$config['oss']['videoDir'] = getenv('OSS_VIDEODIR');
$config['oss']['image']['style'] = getenv('OSS_IMAGE_STYLE'); //图片压缩规则
$config['oss']['video']['shot'] = getenv('OSS_VIDEO_SHOT');

// 品牌商客服电话
$config['brand_tel'] = '022-1111111';

/**
 * 设置Cookie生存周期
 */
//$config['cookie']['expire'] = 3600;

/**
 * 设置Session生存周期
 */
//$config['session']['expire'] = 3600;

/**
 * cookie、session 加密key
 */
$config['security_key'] = 'wesleywu_2018_05';
